//
//  WXPAuthContactContentView.m
//  MexicoLoan
//
//  Created by wxp on 2025/3/3.
//

#import "WXPAuthContactContentView.h"

@implementation WXPAuthContactContentView

#pragma mark - lazy
- (UIView *)viewContent{
    if (!_viewContent) {
        _viewContent = [UIView new];
        _viewContent.backgroundColor = COLOR_WHITE;
        _viewContent.width = SCREEN_WIDTH-LEFT_MARDIN*2;
    }
    return _viewContent;
}

- (WXPContactChooseItemView *)firstContactView{
    if (!_firstContactView) {
        _firstContactView = [WXPContactChooseItemView new];
        [_firstContactView resetTitle:@"Relación con Contact 1"];
        _firstContactView.type = 1;
    }
    return _firstContactView;
}
- (WXPContactChooseItemView *)secContactView{
    if (!_secContactView) {
        _secContactView = [WXPContactChooseItemView new];
        [_secContactView resetTitle:@"Relación con Contact 2"];
        _secContactView.type = 2;
    }
    return _secContactView;
}

#pragma mark - 初始化
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        self.width = SCREEN_WIDTH;
        [self configUI];
    }
    return self;
}

- (void)configUI{
    self.viewContent = [UIView initWithViews:@[
        self.firstContactView,
        [GlobalMethod getViewWithHeight:Ratio(15)],
        self.secContactView,
    ] width:SCREEN_WIDTH-2*LEFT_MARDIN];
    self.viewContent.backgroundColor = [UIColor clearColor];
    self.viewContent.centerXTop = XY(self.width/2, 0);
    [self addSubview:self.viewContent];
    self.height = self.viewContent.bottom+Ratio(20);
}

@end
